package com.edais.dao;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import com.edais.persistence.SecurityMapper;

@Repository

public class SecurityDao {
	@Autowired
	private SecurityMapper securityMapper;
	
	/**
	 * 获取用户的登录识别码
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public String getLoginTokenStr(Map<String, String> map) throws Exception {
		return securityMapper.getLoginTokenStr(map);
	}
	
	/**
	 * 登录时更新用户的登录识别码
	 * @param map
	 * @return 
	 * @throws Exception 
	 */
	public void updLoginTokenStr(Map<String, String> map) throws Exception {
		securityMapper.updLoginTokenStr(map);
	}

	/**
	 * 退出时更新用户的登录识别码
	 * @param map
	 * @return 
	 * @throws Exception 
	 */
	public void updExitTokenStr(Map<String, String> map) throws Exception {
		securityMapper.updExitTokenStr(map);
	}
}
